package gui;

import java.awt.*;
import javax.swing.*;

public class BooleanDropDown extends JComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private boolean value;
	private String t;
	private JComboBox menu;
	public BooleanDropDown(boolean initial,String desc,String t,String f) {
		value = initial;
		this.t = t;
		setLayout(new FlowLayout());
		String[] val = {t, f};
		menu = new JComboBox(val);
		add(new JLabel(desc));
		menu.setSelectedIndex(initial ? 0 : 1);
		add(menu);
	}
	public boolean getValue() {
		return menu.getSelectedItem().equals(t);
	}
}
